﻿@{
    ViewBag.Title = "Form";
    Layout = "~/Views/Shared/_Form.cshtml";
}

<script>
    var keyValue = $.request("keyValue");
    $(function () {
        initControl();
        if (!!keyValue) {
            $.ajax({
                url: "/WorkflowManage/Workflownodeoperator/GetFormJson",
                data: { keyValue: keyValue },
                dataType: "json",
                async: false,
                success: function (data) {
                    $("#form1").formSerialize(data);
                }
            });
        }
    });
    function initControl() {
        $("#nodeactionid").bindSelect({
            url: "/WorkflowManage/Workflownodeoperator/GetSelectNaJson",
        });
        $("#nodeoperator").bindSelect({
            url: "/WorkflowManage/Workflownodeoperator/GetSelectUserJson",
        });
    }
    function submitForm() {
        if (!$('#form1').formValid()) {
            return false;
        }
        $.submitForm({
            url: "/WorkflowManage/Workflownodeoperator/SubmitForm?keyValue=" + keyValue,
            param: $("#form1").formSerialize(),
            success: function () {
                $.currentWindow().$("#gridList").trigger("reloadGrid"); 
                //$('#form1').close();
            }
        })
    }
    //$(function () {
    //    $("#begintime").datepicker(
    //        {
    //            changeMonth: true,
    //            changeYear: true,
    //            showButtonPanel: true
    //        });
    //    $("#endtime").datepicker(
    //        {
    //            changeMonth: true,
    //            changeYear: true,
    //            showButtonPanel: true
    //        });
    //})
</script>
<form id="form1">
    <div style="margin-top: 10px; margin-left: 10px; margin-right: 10px;">
        <ul class="nav nav-tabs">
            <li class="active"><a href="#">基本信息</a></li>
            @*<li ><a href="#">扩展信息</a></li>*@
        </ul>
        <div style="padding-top: 20px; margin-right: 30px;">
             <table class="form">
                <tr>
                    <th class="formTitle">节点动作</th>
                    <td class="formValue">
                        <select id="nodeactionid" name="nodeactionid" class="form-control">
                        </select>
                    </td>
                    <th class="formTitle">操作者</th>
                    <td class="formValue">
                        <select id="nodeoperator" name="nodeoperator" class="form-control">
                        </select>
                    </td>
                </tr>
                <tr>
                    <th class="formTitle"> 操作者类型</th>
                    <td class="formValue">
                        <select id="operatortype" name="operatortype" class="form-control required">
                            <option value="">==请选择==</option>
                            <option value="1" title="角色">角色</option>
                            <option value="2" title="用户">用户</option>
                        </select>
                    </td>
                    <th class="formTitle">开始时间</th>
                    <td class="formValue">
                        <input id="begintime" name="begintime" onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd' })" type="text"   class="form-control required"  placeholder="请输入开始时间"/>
                    </td>
                </tr>
                <tr>
                    <th class="formTitle"> 结束时间</th>
                    <td class="formValue">
                        <input id="endtime" name="endtime" onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd' })" type="text" class="form-control  required"  placeholder="请输入结束时间"/>
                    </td>
                    <th class="formTitle">操作状态</th>
                    <td class="formValue">
                        <select id="operatorstatus" name="operatorstatus" class="form-control required">
                            <option value="">==请选择==</option>
                            <option value="1" title="启用">启用</option>
                            <option value="2" title="未启用">未启用</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <th class="formTitle">操作锁定状态</th>
                    <td class="formValue">
                        <select id="operatorlock" name="operatorlock" class="form-control required">
                            <option value="">==请选择==</option>
                            <option value="1" title="锁定">锁定</option>
                            <option value="2" title="未锁定">未锁定</option>
                        </select>
                    </td>
                </tr>
                  
            </table>
            
        </div>
    </div>
</form>

